3.1.98 \(\int (-a+b \cot (c+d x)) (a+b \cot (c+d x))^{5/2} \, dx\) [98]

3.1.98.1 Optimal result
3.1.98.2 Mathematica [A] (verified)
3.1.98.3 Rubi [A] (warning: unable to verify)
3.1.98.4 Maple [B] (verified)
3.1.98.5 Fricas [B] (verification not implemented)
3.1.98.6 Sympy [F]
3.1.98.7 Maxima [F]
3.1.98.8 Giac [F]
3.1.98.9 Mupad [B] (verification not implemented)

3.1.98.1 Optimal result

Integrand size = 27, antiderivative size = 151 \[ \int (-a+b \cot (c+d x)) (a+b \cot (c+d x))^{5/2} \, dx=-\frac {(i a-b) (a-i b)^{5/2} \text {arctanh}\left (\frac {\sqrt {a+b \cot (c+d x)}}{\sqrt {a-i b}}\right )}{d}+\frac {(a+i b)^{5/2} (i a+b) \text {arctanh}\left (\frac {\sqrt {a+b \cot (c+d x)}}{\sqrt {a+i b}}\right )}{d}+\frac {2 b \left (a^2+b^2\right ) \sqrt {a+b \cot (c+d x)}}{d}-\frac {2 b (a+b \cot (c+d x))^{5/2}}{5 d} \]

output
-(I*a-b)*(a-I*b)^(5/2)*arctanh((a+b*cot(d*x+c))^(1/2)/(a-I*b)^(1/2))/d+(a+ 
I*b)^(5/2)*(I*a+b)*arctanh((a+b*cot(d*x+c))^(1/2)/(a+I*b)^(1/2))/d-2/5*b*( 
a+b*cot(d*x+c))^(5/2)/d+2*b*(a^2+b^2)*(a+b*cot(d*x+c))^(1/2)/d
 
3.1.98.2 Mathematica [A] (verified)

Time = 1.21 (sec) , antiderivative size = 222, normalized size of antiderivative = 1.47 \[ \int (-a+b \cot (c+d x)) (a+b \cot (c+d x))^{5/2} \, dx=\frac {b \left (\frac {5 \left (a^2+b^2\right ) \left (a^2-b^2-2 a \sqrt {-b^2}\right ) \text {arctanh}\left (\frac {\sqrt {a+b \cot (c+d x)}}{\sqrt {a-\sqrt {-b^2}}}\right )}{\sqrt {-b^2} \sqrt {a-\sqrt {-b^2}}}-\frac {5 \left (a^2+b^2\right ) \left (a^2-b^2+2 a \sqrt {-b^2}\right ) \text {arctanh}\left (\frac {\sqrt {a+b \cot (c+d x)}}{\sqrt {a+\sqrt {-b^2}}}\right )}{\sqrt {-b^2} \sqrt {a+\sqrt {-b^2}}}+10 \left (a^2+b^2\right ) \sqrt {a+b \cot (c+d x)}-2 (a+b \cot (c+d x))^{5/2}\right )}{5 d} \]

input
Integrate[(-a + b*Cot[c + d*x])*(a + b*Cot[c + d*x])^(5/2),x]
 
output
(b*((5*(a^2 + b^2)*(a^2 - b^2 - 2*a*Sqrt[-b^2])*ArcTanh[Sqrt[a + b*Cot[c + 
 d*x]]/Sqrt[a - Sqrt[-b^2]]])/(Sqrt[-b^2]*Sqrt[a - Sqrt[-b^2]]) - (5*(a^2 
+ b^2)*(a^2 - b^2 + 2*a*Sqrt[-b^2])*ArcTanh[Sqrt[a + b*Cot[c + d*x]]/Sqrt[ 
a + Sqrt[-b^2]]])/(Sqrt[-b^2]*Sqrt[a + Sqrt[-b^2]]) + 10*(a^2 + b^2)*Sqrt[ 
a + b*Cot[c + d*x]] - 2*(a + b*Cot[c + d*x])^(5/2)))/(5*d)
 
3.1.98.3 Rubi [A] (warning: unable to verify)

Time = 0.68 (sec) , antiderivative size = 123, normalized size of antiderivative = 0.81, number of steps used = 13, number of rules used = 12, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.444, Rules used = {3042, 4011, 27, 3042, 3963, 3042, 4022, 3042, 4020, 25, 73, 221}

Below are the steps used by Rubi to obtain the solution. The rule number used for the transformation is given above next to the arrow. The rules definitions used are listed below.

\(\displaystyle \int (b \cot (c+d x)-a) (a+b \cot (c+d x))^{5/2} \, dx\)

\(\Big \downarrow \) 3042

\(\displaystyle \int \left (-a-b \tan \left (c+d x+\frac {\pi }{2}\right )\right ) \left (a-b \tan \left (c+d x+\frac {\pi }{2}\right )\right )^{5/2}dx\)

\(\Big \downarrow \) 4011

\(\displaystyle \int \left (-a^2-b^2\right ) (a+b \cot (c+d x))^{3/2}dx-\frac {2 b (a+b \cot (c+d x))^{5/2}}{5 d}\)

\(\Big \downarrow \) 27

\(\displaystyle -\left (a^2+b^2\right ) \int (a+b \cot (c+d x))^{3/2}dx-\frac {2 b (a+b \cot (c+d x))^{5/2}}{5 d}\)

\(\Big \downarrow \) 3042

\(\displaystyle -\left (a^2+b^2\right ) \int \left (a-b \tan \left (c+d x+\frac {\pi }{2}\right )\right )^{3/2}dx-\frac {2 b (a+b \cot (c+d x))^{5/2}}{5 d}\)

\(\Big \downarrow \) 3963

\(\displaystyle -\left (a^2+b^2\right ) \left (\int \frac {a^2+2 b \cot (c+d x) a-b^2}{\sqrt {a+b \cot (c+d x)}}dx-\frac {2 b \sqrt {a+b \cot (c+d x)}}{d}\right )-\frac {2 b (a+b \cot (c+d x))^{5/2}}{5 d}\)

\(\Big \downarrow \) 3042

\(\displaystyle -\left (a^2+b^2\right ) \left (\int \frac {a^2-2 b \tan \left (c+d x+\frac {\pi }{2}\right ) a-b^2}{\sqrt {a-b \tan \left (c+d x+\frac {\pi }{2}\right )}}dx-\frac {2 b \sqrt {a+b \cot (c+d x)}}{d}\right )-\frac {2 b (a+b \cot (c+d x))^{5/2}}{5 d}\)

\(\Big \downarrow \) 4022

\(\displaystyle -\frac {2 b (a+b \cot (c+d x))^{5/2}}{5 d}-\left (a^2+b^2\right ) \left (\frac {1}{2} (a-i b)^2 \int \frac {i \cot (c+d x)+1}{\sqrt {a+b \cot (c+d x)}}dx+\frac {1}{2} (a+i b)^2 \int \frac {1-i \cot (c+d x)}{\sqrt {a+b \cot (c+d x)}}dx-\frac {2 b \sqrt {a+b \cot (c+d x)}}{d}\right )\)

\(\Big \downarrow \) 3042

\(\displaystyle -\frac {2 b (a+b \cot (c+d x))^{5/2}}{5 d}-\left (a^2+b^2\right ) \left (\frac {1}{2} (a-i b)^2 \int \frac {1-i \tan \left (c+d x+\frac {\pi }{2}\right )}{\sqrt {a-b \tan \left (c+d x+\frac {\pi }{2}\right )}}dx+\frac {1}{2} (a+i b)^2 \int \frac {i \tan \left (c+d x+\frac {\pi }{2}\right )+1}{\sqrt {a-b \tan \left (c+d x+\frac {\pi }{2}\right )}}dx-\frac {2 b \sqrt {a+b \cot (c+d x)}}{d}\right )\)

\(\Big \downarrow \) 4020

\(\displaystyle -\frac {2 b (a+b \cot (c+d x))^{5/2}}{5 d}-\left (a^2+b^2\right ) \left (-\frac {i (a-i b)^2 \int -\frac {1}{(1-i \cot (c+d x)) \sqrt {a+b \cot (c+d x)}}d(i \cot (c+d x))}{2 d}+\frac {i (a+i b)^2 \int -\frac {1}{(i \cot (c+d x)+1) \sqrt {a+b \cot (c+d x)}}d(-i \cot (c+d x))}{2 d}-\frac {2 b \sqrt {a+b \cot (c+d x)}}{d}\right )\)

\(\Big \downarrow \) 25

\(\displaystyle -\frac {2 b (a+b \cot (c+d x))^{5/2}}{5 d}-\left (a^2+b^2\right ) \left (\frac {i (a-i b)^2 \int \frac {1}{(1-i \cot (c+d x)) \sqrt {a+b \cot (c+d x)}}d(i \cot (c+d x))}{2 d}-\frac {i (a+i b)^2 \int \frac {1}{(i \cot (c+d x)+1) \sqrt {a+b \cot (c+d x)}}d(-i \cot (c+d x))}{2 d}-\frac {2 b \sqrt {a+b \cot (c+d x)}}{d}\right )\)

\(\Big \downarrow \) 73

\(\displaystyle -\frac {2 b (a+b \cot (c+d x))^{5/2}}{5 d}-\left (a^2+b^2\right ) \left (-\frac {(a-i b)^2 \int \frac {1}{\frac {i \cot ^2(c+d x)}{b}+\frac {i a}{b}+1}d\sqrt {a+b \cot (c+d x)}}{b d}-\frac {(a+i b)^2 \int \frac {1}{-\frac {i \cot ^2(c+d x)}{b}-\frac {i a}{b}+1}d\sqrt {a+b \cot (c+d x)}}{b d}-\frac {2 b \sqrt {a+b \cot (c+d x)}}{d}\right )\)

\(\Big \downarrow \) 221

\(\displaystyle -\frac {2 b (a+b \cot (c+d x))^{5/2}}{5 d}-\left (a^2+b^2\right ) \left (-\frac {(a-i b)^{3/2} \arctan \left (\frac {\cot (c+d x)}{\sqrt {a-i b}}\right )}{d}-\frac {(a+i b)^{3/2} \arctan \left (\frac {\cot (c+d x)}{\sqrt {a+i b}}\right )}{d}-\frac {2 b \sqrt {a+b \cot (c+d x)}}{d}\right )\)

input
Int[(-a + b*Cot[c + d*x])*(a + b*Cot[c + d*x])^(5/2),x]
 
output
(-2*b*(a + b*Cot[c + d*x])^(5/2))/(5*d) - (a^2 + b^2)*(-(((a - I*b)^(3/2)* 
ArcTan[Cot[c + d*x]/Sqrt[a - I*b]])/d) - ((a + I*b)^(3/2)*ArcTan[Cot[c + d 
*x]/Sqrt[a + I*b]])/d - (2*b*Sqrt[a + b*Cot[c + d*x]])/d)
 

3.1.98.3.1 Defintions of rubi rules used

rule 25
Int[-(Fx_), x_Symbol] :> Simp[Identity[-1]   Int[Fx, x], x]
 

rule 27
Int[(a_)*(Fx_), x_Symbol] :> Simp[a   Int[Fx, x], x] /; FreeQ[a, x] &&  !Ma 
tchQ[Fx, (b_)*(Gx_) /; FreeQ[b, x]]
 

rule 73
Int[((a_.) + (b_.)*(x_))^(m_)*((c_.) + (d_.)*(x_))^(n_), x_Symbol] :> With[ 
{p = Denominator[m]}, Simp[p/b   Subst[Int[x^(p*(m + 1) - 1)*(c - a*(d/b) + 
 d*(x^p/b))^n, x], x, (a + b*x)^(1/p)], x]] /; FreeQ[{a, b, c, d}, x] && Lt 
Q[-1, m, 0] && LeQ[-1, n, 0] && LeQ[Denominator[n], Denominator[m]] && IntL 
inearQ[a, b, c, d, m, n, x]
 

rule 221
Int[((a_) + (b_.)*(x_)^2)^(-1), x_Symbol] :> Simp[(Rt[-a/b, 2]/a)*ArcTanh[x 
/Rt[-a/b, 2]], x] /; FreeQ[{a, b}, x] && NegQ[a/b]
 

rule 3042
Int[u_, x_Symbol] :> Int[DeactivateTrig[u, x], x] /; FunctionOfTrigOfLinear 
Q[u, x]
 

rule 3963
Int[((a_) + (b_.)*tan[(c_.) + (d_.)*(x_)])^(n_), x_Symbol] :> Simp[b*((a + 
b*Tan[c + d*x])^(n - 1)/(d*(n - 1))), x] + Int[(a^2 - b^2 + 2*a*b*Tan[c + d 
*x])*(a + b*Tan[c + d*x])^(n - 2), x] /; FreeQ[{a, b, c, d}, x] && NeQ[a^2 
+ b^2, 0] && GtQ[n, 1]
 

rule 4011
Int[((a_.) + (b_.)*tan[(e_.) + (f_.)*(x_)])^(m_)*((c_.) + (d_.)*tan[(e_.) + 
 (f_.)*(x_)]), x_Symbol] :> Simp[d*((a + b*Tan[e + f*x])^m/(f*m)), x] + Int 
[(a + b*Tan[e + f*x])^(m - 1)*Simp[a*c - b*d + (b*c + a*d)*Tan[e + f*x], x] 
, x] /; FreeQ[{a, b, c, d, e, f}, x] && NeQ[b*c - a*d, 0] && NeQ[a^2 + b^2, 
 0] && GtQ[m, 0]
 

rule 4020
Int[((a_.) + (b_.)*tan[(e_.) + (f_.)*(x_)])^(m_)*((c_) + (d_.)*tan[(e_.) + 
(f_.)*(x_)]), x_Symbol] :> Simp[c*(d/f)   Subst[Int[(a + (b/d)*x)^m/(d^2 + 
c*x), x], x, d*Tan[e + f*x]], x] /; FreeQ[{a, b, c, d, e, f, m}, x] && NeQ[ 
b*c - a*d, 0] && NeQ[a^2 + b^2, 0] && EqQ[c^2 + d^2, 0]
 

rule 4022
Int[((a_.) + (b_.)*tan[(e_.) + (f_.)*(x_)])^(m_)*((c_.) + (d_.)*tan[(e_.) + 
 (f_.)*(x_)]), x_Symbol] :> Simp[(c + I*d)/2   Int[(a + b*Tan[e + f*x])^m*( 
1 - I*Tan[e + f*x]), x], x] + Simp[(c - I*d)/2   Int[(a + b*Tan[e + f*x])^m 
*(1 + I*Tan[e + f*x]), x], x] /; FreeQ[{a, b, c, d, e, f, m}, x] && NeQ[b*c 
 - a*d, 0] && NeQ[a^2 + b^2, 0] && NeQ[c^2 + d^2, 0] &&  !IntegerQ[m]
 
3.1.98.4 Maple [B] (verified)

Leaf count of result is larger than twice the leaf count of optimal. \(1374\) vs. \(2(127)=254\).

Time = 0.08 (sec) , antiderivative size = 1375, normalized size of antiderivative = 9.11

method result size
derivativedivides \(\text {Expression too large to display}\) \(1375\)
default \(\text {Expression too large to display}\) \(1375\)
parts \(\text {Expression too large to display}\) \(2386\)

input
int((-a+b*cot(d*x+c))*(a+b*cot(d*x+c))^(5/2),x,method=_RETURNVERBOSE)
 
output
-2/5*b*(a+b*cot(d*x+c))^(5/2)/d+2/d*b*(a+b*cot(d*x+c))^(1/2)*a^2+2/d*b^3*( 
a+b*cot(d*x+c))^(1/2)+1/4/d/b*ln((a+b*cot(d*x+c))^(1/2)*(2*(a^2+b^2)^(1/2) 
+2*a)^(1/2)-b*cot(d*x+c)-(a^2+b^2)^(1/2)-a)*(2*(a^2+b^2)^(1/2)+2*a)^(1/2)* 
(a^2+b^2)^(1/2)*a^3+1/4/d*b*ln((a+b*cot(d*x+c))^(1/2)*(2*(a^2+b^2)^(1/2)+2 
*a)^(1/2)-b*cot(d*x+c)-(a^2+b^2)^(1/2)-a)*(2*(a^2+b^2)^(1/2)+2*a)^(1/2)*(a 
^2+b^2)^(1/2)*a-1/4/d/b*ln((a+b*cot(d*x+c))^(1/2)*(2*(a^2+b^2)^(1/2)+2*a)^ 
(1/2)-b*cot(d*x+c)-(a^2+b^2)^(1/2)-a)*(2*(a^2+b^2)^(1/2)+2*a)^(1/2)*a^4+1/ 
4/d*b^3*ln((a+b*cot(d*x+c))^(1/2)*(2*(a^2+b^2)^(1/2)+2*a)^(1/2)-b*cot(d*x+ 
c)-(a^2+b^2)^(1/2)-a)*(2*(a^2+b^2)^(1/2)+2*a)^(1/2)+1/d*b/(2*(a^2+b^2)^(1/ 
2)-2*a)^(1/2)*arctan((-2*(a+b*cot(d*x+c))^(1/2)+(2*(a^2+b^2)^(1/2)+2*a)^(1 
/2))/(2*(a^2+b^2)^(1/2)-2*a)^(1/2))*(a^2+b^2)^(1/2)*a^2+1/d*b^3/(2*(a^2+b^ 
2)^(1/2)-2*a)^(1/2)*arctan((-2*(a+b*cot(d*x+c))^(1/2)+(2*(a^2+b^2)^(1/2)+2 
*a)^(1/2))/(2*(a^2+b^2)^(1/2)-2*a)^(1/2))*(a^2+b^2)^(1/2)-2/d*b/(2*(a^2+b^ 
2)^(1/2)-2*a)^(1/2)*arctan((-2*(a+b*cot(d*x+c))^(1/2)+(2*(a^2+b^2)^(1/2)+2 
*a)^(1/2))/(2*(a^2+b^2)^(1/2)-2*a)^(1/2))*a^3-2/d*b^3/(2*(a^2+b^2)^(1/2)-2 
*a)^(1/2)*arctan((-2*(a+b*cot(d*x+c))^(1/2)+(2*(a^2+b^2)^(1/2)+2*a)^(1/2)) 
/(2*(a^2+b^2)^(1/2)-2*a)^(1/2))*a-1/4/d/b*ln(b*cot(d*x+c)+a+(a+b*cot(d*x+c 
))^(1/2)*(2*(a^2+b^2)^(1/2)+2*a)^(1/2)+(a^2+b^2)^(1/2))*(2*(a^2+b^2)^(1/2) 
+2*a)^(1/2)*(a^2+b^2)^(1/2)*a^3-1/4/d*b*ln(b*cot(d*x+c)+a+(a+b*cot(d*x+c)) 
^(1/2)*(2*(a^2+b^2)^(1/2)+2*a)^(1/2)+(a^2+b^2)^(1/2))*(2*(a^2+b^2)^(1/2...
 
3.1.98.5 Fricas [B] (verification not implemented)

Leaf count of result is larger than twice the leaf count of optimal. 1684 vs. \(2 (118) = 236\).

Time = 0.31 (sec) , antiderivative size = 1684, normalized size of antiderivative = 11.15 \[ \int (-a+b \cot (c+d x)) (a+b \cot (c+d x))^{5/2} \, dx=\text {Too large to display} \]

input
integrate((-a+b*cot(d*x+c))*(a+b*cot(d*x+c))^(5/2),x, algorithm="fricas")
 
output
1/10*(5*(d*cos(2*d*x + 2*c) - d)*sqrt(-(a^7 - a^5*b^2 - 5*a^3*b^4 - 3*a*b^ 
6 + d^2*sqrt(-(9*a^12*b^2 + 30*a^10*b^4 + 31*a^8*b^6 + 4*a^6*b^8 - 9*a^4*b 
^10 - 2*a^2*b^12 + b^14)/d^4))/d^2)*log(-(3*a^10*b + 11*a^8*b^3 + 14*a^6*b 
^5 + 6*a^4*b^7 - a^2*b^9 - b^11)*sqrt((b*cos(2*d*x + 2*c) + a*sin(2*d*x + 
2*c) + b)/sin(2*d*x + 2*c)) + (a*d^3*sqrt(-(9*a^12*b^2 + 30*a^10*b^4 + 31* 
a^8*b^6 + 4*a^6*b^8 - 9*a^4*b^10 - 2*a^2*b^12 + b^14)/d^4) + (3*a^6*b^2 + 
5*a^4*b^4 + a^2*b^6 - b^8)*d)*sqrt(-(a^7 - a^5*b^2 - 5*a^3*b^4 - 3*a*b^6 + 
 d^2*sqrt(-(9*a^12*b^2 + 30*a^10*b^4 + 31*a^8*b^6 + 4*a^6*b^8 - 9*a^4*b^10 
 - 2*a^2*b^12 + b^14)/d^4))/d^2)) - 5*(d*cos(2*d*x + 2*c) - d)*sqrt(-(a^7 
- a^5*b^2 - 5*a^3*b^4 - 3*a*b^6 + d^2*sqrt(-(9*a^12*b^2 + 30*a^10*b^4 + 31 
*a^8*b^6 + 4*a^6*b^8 - 9*a^4*b^10 - 2*a^2*b^12 + b^14)/d^4))/d^2)*log(-(3* 
a^10*b + 11*a^8*b^3 + 14*a^6*b^5 + 6*a^4*b^7 - a^2*b^9 - b^11)*sqrt((b*cos 
(2*d*x + 2*c) + a*sin(2*d*x + 2*c) + b)/sin(2*d*x + 2*c)) - (a*d^3*sqrt(-( 
9*a^12*b^2 + 30*a^10*b^4 + 31*a^8*b^6 + 4*a^6*b^8 - 9*a^4*b^10 - 2*a^2*b^1 
2 + b^14)/d^4) + (3*a^6*b^2 + 5*a^4*b^4 + a^2*b^6 - b^8)*d)*sqrt(-(a^7 - a 
^5*b^2 - 5*a^3*b^4 - 3*a*b^6 + d^2*sqrt(-(9*a^12*b^2 + 30*a^10*b^4 + 31*a^ 
8*b^6 + 4*a^6*b^8 - 9*a^4*b^10 - 2*a^2*b^12 + b^14)/d^4))/d^2)) - 5*(d*cos 
(2*d*x + 2*c) - d)*sqrt(-(a^7 - a^5*b^2 - 5*a^3*b^4 - 3*a*b^6 - d^2*sqrt(- 
(9*a^12*b^2 + 30*a^10*b^4 + 31*a^8*b^6 + 4*a^6*b^8 - 9*a^4*b^10 - 2*a^2*b^ 
12 + b^14)/d^4))/d^2)*log(-(3*a^10*b + 11*a^8*b^3 + 14*a^6*b^5 + 6*a^4*...
 
3.1.98.6 Sympy [F]

\[ \int (-a+b \cot (c+d x)) (a+b \cot (c+d x))^{5/2} \, dx=- \int a^{3} \sqrt {a + b \cot {\left (c + d x \right )}}\, dx - \int \left (- b^{3} \sqrt {a + b \cot {\left (c + d x \right )}} \cot ^{3}{\left (c + d x \right )}\right )\, dx - \int \left (- a b^{2} \sqrt {a + b \cot {\left (c + d x \right )}} \cot ^{2}{\left (c + d x \right )}\right )\, dx - \int a^{2} b \sqrt {a + b \cot {\left (c + d x \right )}} \cot {\left (c + d x \right )}\, dx \]

input
integrate((-a+b*cot(d*x+c))*(a+b*cot(d*x+c))**(5/2),x)
 
output
-Integral(a**3*sqrt(a + b*cot(c + d*x)), x) - Integral(-b**3*sqrt(a + b*co 
t(c + d*x))*cot(c + d*x)**3, x) - Integral(-a*b**2*sqrt(a + b*cot(c + d*x) 
)*cot(c + d*x)**2, x) - Integral(a**2*b*sqrt(a + b*cot(c + d*x))*cot(c + d 
*x), x)
 
3.1.98.7 Maxima [F]

\[ \int (-a+b \cot (c+d x)) (a+b \cot (c+d x))^{5/2} \, dx=\int { {\left (b \cot \left (d x + c\right ) + a\right )}^{\frac {5}{2}} {\left (b \cot \left (d x + c\right ) - a\right )} \,d x } \]

input
integrate((-a+b*cot(d*x+c))*(a+b*cot(d*x+c))^(5/2),x, algorithm="maxima")
 
output
integrate((b*cot(d*x + c) + a)^(5/2)*(b*cot(d*x + c) - a), x)
 
3.1.98.8 Giac [F]

\[ \int (-a+b \cot (c+d x)) (a+b \cot (c+d x))^{5/2} \, dx=\int { {\left (b \cot \left (d x + c\right ) + a\right )}^{\frac {5}{2}} {\left (b \cot \left (d x + c\right ) - a\right )} \,d x } \]

input
integrate((-a+b*cot(d*x+c))*(a+b*cot(d*x+c))^(5/2),x, algorithm="giac")
 
output
integrate((b*cot(d*x + c) + a)^(5/2)*(b*cot(d*x + c) - a), x)
 
3.1.98.9 Mupad [B] (verification not implemented)

Time = 40.09 (sec) , antiderivative size = 3442, normalized size of antiderivative = 22.79 \[ \int (-a+b \cot (c+d x)) (a+b \cot (c+d x))^{5/2} \, dx=\text {Too large to display} \]

input
int(-(a + b*cot(c + d*x))^(5/2)*(a - b*cot(c + d*x)),x)
 
output
log(((((-a^4*b^2*d^4*(5*a^4 + b^4 - 10*a^2*b^2)^2)^(1/2) - a^7*d^2 - 5*a^3 
*b^4*d^2 + 10*a^5*b^2*d^2)/d^4)^(1/2)*(((((-a^4*b^2*d^4*(5*a^4 + b^4 - 10* 
a^2*b^2)^2)^(1/2) - a^7*d^2 - 5*a^3*b^4*d^2 + 10*a^5*b^2*d^2)/d^4)^(1/2)*( 
64*a^2*b^5 + 64*a^4*b^3 - 32*a*b^2*d*(((-a^4*b^2*d^4*(5*a^4 + b^4 - 10*a^2 
*b^2)^2)^(1/2) - a^7*d^2 - 5*a^3*b^4*d^2 + 10*a^5*b^2*d^2)/d^4)^(1/2)*(a + 
 b*cot(c + d*x))^(1/2)))/(2*d) - (16*a^2*b^2*(a + b*cot(c + d*x))^(1/2)*(a 
^6 - b^6 + 15*a^2*b^4 - 15*a^4*b^2))/d^2))/2 - (8*a^3*b^3*(3*a^2 - b^2)*(a 
^2 + b^2)^3)/d^3)*((20*a^6*b^8*d^4 - a^4*b^10*d^4 - 110*a^8*b^6*d^4 + 100* 
a^10*b^4*d^4 - 25*a^12*b^2*d^4)^(1/2)/(4*d^4) - a^7/(4*d^2) - (5*a^3*b^4)/ 
(4*d^2) + (5*a^5*b^2)/(2*d^2))^(1/2) - log(((-((-a^4*b^2*d^4*(5*a^4 + b^4 
- 10*a^2*b^2)^2)^(1/2) + a^7*d^2 + 5*a^3*b^4*d^2 - 10*a^5*b^2*d^2)/d^4)^(1 
/2)*(((-((-a^4*b^2*d^4*(5*a^4 + b^4 - 10*a^2*b^2)^2)^(1/2) + a^7*d^2 + 5*a 
^3*b^4*d^2 - 10*a^5*b^2*d^2)/d^4)^(1/2)*(64*a^2*b^5 + 64*a^4*b^3 + 32*a*b^ 
2*d*(-((-a^4*b^2*d^4*(5*a^4 + b^4 - 10*a^2*b^2)^2)^(1/2) + a^7*d^2 + 5*a^3 
*b^4*d^2 - 10*a^5*b^2*d^2)/d^4)^(1/2)*(a + b*cot(c + d*x))^(1/2)))/(2*d) + 
 (16*a^2*b^2*(a + b*cot(c + d*x))^(1/2)*(a^6 - b^6 + 15*a^2*b^4 - 15*a^4*b 
^2))/d^2))/2 - (8*a^3*b^3*(3*a^2 - b^2)*(a^2 + b^2)^3)/d^3)*(-(a^7*d^2 + ( 
20*a^6*b^8*d^4 - a^4*b^10*d^4 - 110*a^8*b^6*d^4 + 100*a^10*b^4*d^4 - 25*a^ 
12*b^2*d^4)^(1/2) + 5*a^3*b^4*d^2 - 10*a^5*b^2*d^2)/(4*d^4))^(1/2) + log(( 
(-((-a^4*b^2*d^4*(5*a^4 + b^4 - 10*a^2*b^2)^2)^(1/2) + a^7*d^2 + 5*a^3*...